package com.zero.test1;

public class ExtendsTest {
    public static void main(String[] args) {
        Person p = new Student("惠惠", "11", "萌妹子", "001", "001");
        Person p1 = new Teacher("爱丽丝", "11", "萌妹子", 10000.0);
        Person p2 = new Doctor("惠惠", "11", "萌妹子", "010");
        p.eat();
        p.sleep();
        ((Student) p) .study();

        p.eat();
        p.sleep();
        ((Teacher) p) .teach();


    }
}
